<div class="col-sm-9">
    <br>
    <div class="panel  panel-success">
        <div class="panel-body">前台链接管理</div>
    </div>
    <ul class="list-group">
        <li class="list-group-item">
            <div class="input-group" id="a1">
                <span class="input-group-addon">重庆时时彩</span>
                <input type="text" class="form-control" name="ssc" value="{:cache('ssc');}">
                <span class="input-group-btn">
                    <button class="btn btn-success" type="button" onclick="ajax('a1')">提交更改</button>
                </span>
            </div>
        </li>
        <li class="list-group-item">
            <div class="input-group" id="a2">
                <span class="input-group-addon">腾讯分分彩</span>
                <input type="text" class="form-control" name="txffc" value="{:cache('txffc');}">
                <span class="input-group-btn">
                    <button class="btn btn-success" type="button" onclick="ajax('a2')">提交更改</button>
                </span>
            </div>
        </li>
        <li class="list-group-item">
            <div class="input-group" id="a3">
                <span class="input-group-addon">北京PK10</span>
                <input type="text" class="form-control" name="pk10" value="{:cache('pk10');}">
                <span class="input-group-btn">
                    <button class="btn btn-success" type="button" onclick="ajax('a3')">提交更改</button>
                </span>
            </div>
        </li>
        <li class="list-group-item">
            <div class="input-group" id="a4">
                <span class="input-group-addon">十一选五</span>
                <input type="text" class="form-control" name="syxw" value="{:cache('syxw');}">
                <span class="input-group-btn">
                    <button class="btn btn-success" type="button" onclick="ajax('a4')">提交更改</button>
                </span>
            </div>
        </li>
        <li class="list-group-item">
            <div class="input-group" id="a5">
                <span class="input-group-addon">福彩3D</span>
                <input type="text" class="form-control" name="fc3d" value="{:cache('fc3d');}">
                <span class="input-group-btn">
                    <button class="btn btn-success" type="button" onclick="ajax('a5')">提交更改</button>
                </span>
            </div>
        </li>
        <li class="list-group-item">
            <div class="input-group" id="a6">
                <span class="input-group-addon">排列三</span>
                <input type="text" class="form-control" name="pl3" value="{:cache('pl3');}">
                <span class="input-group-btn">
                    <button class="btn btn-success" type="button" onclick="ajax('a6')">提交更改</button>
                </span>
            </div>
        </li>
    </ul>

    <script>

        function ajax(str) {
            var id = str;
            var href = $('#' + id).children('input').val();
            var name = $('#' + id).children('input').prop('name');
            $.ajax({
                url: '{:url("admin/href/edithref")}',
                type: 'post',
                data: {
                    name: name,
                    href: href,
                },
                success: function (res) {
                    alertmsg(res.message, true);
                }
            })
        }
    </script>
</div>